package com.qcby.mybatis01.plugin;

/**
 * @className: SelfPageHelper
 * @description: 自定义分页辅助类
 * @author: lxt
 **/
public class SelfPageHelper {

    private static final ThreadLocal<SelfPage> LOCAL_PAGE = new ThreadLocal<SelfPage>();

    public static void startPage(int pageNo, int pageSize) {
        SelfPage page = new SelfPage(pageNo, pageSize);
        LOCAL_PAGE.set(page);
    }

    public static void removePage() {
        LOCAL_PAGE.remove();
    }

    public static SelfPage getPage() {
        return LOCAL_PAGE.get();
    }

}
